var windowName = "articles";
var Page,news;
apiready = function(){

    // onWindowShow(function () {
    // })
    onWindowHide(function () {
    })

    news = new List()
    Page = createVM("#Page",{
        //页面数据
        list:[],
        loading:true
    },{
        //页面方法
        "init":function () {
            var data = getData4Page();
            var cat = data.cat
            if(isTrue(cat)){
                news.setData({cat:cat})
            }
            news.setUrl("/api/articles").setCbFunc(function (res) {
                clearLoading();
                Page.list = res
            }).getList()
        },
        OnPullDownRefresh:function () {

        },
        OnPullUpLoadMore:function () {
            news.getList()
        },
    })
    Page.init()
}